﻿<local:DocumentBase x:Class="WPFExcelReport.JLTYLABEL"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
         Background="White" 
         Loaded="Window_Loaded"> 
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" /> 
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Orientation="Vertical" Margin="0,0,0,0">
            <WrapPanel>
                <Label Content="输入品种类别："    Width="118" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTTYPE" Width="50" Margin="10,0,0,0"  HorizontalAlignment="Left" Panel.ZIndex="0"
                         Focusable="True" KeyUp="txtARTTYPE_KeyUp"  CharacterCasing="Upper" Background="Pink" MaxLength="2" FontSize="18" Foreground="#FF141111" Height="33" />
                <TextBlock FontSize="18"  Height="34"   Width="115" Name="txtMaxNO" Margin="5,0,0,0" Text="" />
                <Button Content="查询品种最大编号" Height="35" Margin="10,0,0,0"  Name="btnQueryMaxNO" Panel.ZIndex="2"
                        Width="121" Click="btnQueryMaxNO_Click"/>
            </WrapPanel>
            <WrapPanel >
                <Label Content="输入品种编号："    Width="118" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTICLE" Width="144" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="3"
                         KeyUp="txtARTICLE_KeyUp" Background="Pink" MaxLength="12" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="输入花型号："    Width="102" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtCOLOR" Width="127" Margin="10,0,0,0"  HorizontalAlignment="Left" CharacterCasing="Upper" Panel.ZIndex="3"
                         KeyUp="txtARTICLE_KeyUp" Background="Pink" MaxLength="10" FontSize="18" Foreground="#FF141111" Height="33" />
                <CheckBox IsChecked="True" Background="White" Name="ChkPrinter">选择打印机</CheckBox>
                <Button Content="打印标签" Height="33" Margin="10,0,0,0"  Name="btnPrint" Width="121" Panel.ZIndex="4"
                        Click="btnPrint_Click"/>
                <Button Content="EXCEL标签" Height="33" Margin="10,0,0,0"  Name="btnPrintExcel" Width="121" Panel.ZIndex="5"
                        Click="btnPrintExcel_Click"/>

            </WrapPanel>
            <WrapPanel >
                <Label Content="输入品种编号："    Width="118" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtART" Width="145" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="6"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="12" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="供应商品种："    Width="103" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSUPART" Width="130" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="YellowGreen" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="花型号："    Width="65" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtDESIGN" Width="126" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="7"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="10" FontSize="18" Foreground="#FF141111" Height="33" />
                <Button Content="查询品种资料" Height="33" Margin="10,0,0,0"  Name="btnQuery" Width="102" Panel.ZIndex="8"
                        Click="btnQuery_Click"/>
                <Button Content="导出品种资料" Height="33" Margin="10,0,0,0"  Name="btnEXCEL" Width="94" Panel.ZIndex="9"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,0,0,0" Grid.Row="1"  Grid.ColumnSpan="2">     
          <DataGrid CanUserReorderColumns="True" 
                    CanUserResizeRows="True" CanUserSortColumns="True"
                    AutoGenerateColumns="False"   
                    EnableRowVirtualization="True"  
                    EnableColumnVirtualization="True"  
                    HorizontalScrollBarVisibility="Auto"
                    VerticalScrollBarVisibility="Auto"
                    RowDetailsVisibilityMode="VisibleWhenSelected" 
                    HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                    IsSynchronizedWithCurrentItem="True" Visibility="Visible"
                    ItemsSource="{Binding}" x:Name="MasterDg" 
                    >
              <DataGrid.Columns>
                  <DataGridTextColumn Binding="{Binding Path=VAAART}" Header="品种编号" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=DES}" Header="品种描述" Width="Auto" MinWidth="70" />
                    <DataGridTextColumn Binding="{Binding Path=DESIGN}" Header="花型号" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=TOTWIDTH}" Header="外幅" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=VALWIDTH}" Header="内幅" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=WAFGRQM}" Header="克/平方" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=WAFGRLFD}" Header="克/米" Width="Auto" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=YARN}" Header="纱支" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=WABIND}" Header="价格" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=WALOHNA}" Header="外部编号" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=SUPP}" Header="供应商" Width="Auto" MinWidth="50" MaxWidth="100" />
                    <DataGridTextColumn Binding="{Binding Path=COMP}" Header="成份" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=WANEUD}" Header="建立日期" Width="Auto" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=REMARK}" Header="备注" Width="Auto" MinWidth="50" />
              </DataGrid.Columns>
          </DataGrid  >          
        </StackPanel>
    </Grid>
</local:DocumentBase>
